//
//  HYHTTPRequest.m
//  Life assistant
//
//  Created by HYMac on 16/2/25.
//  Copyright © 2016年 HY. All rights reserved.
//

#import "HYHTTPRequest.h"
#import "AFNetworking/AFNetworking.h"
@implementation HYHTTPRequest
+(void)requestWithURL:(NSString *)path param:(NSDictionary *)paramDic Sucess:(void (^)(id result))sucess
{
    AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManager manager];

    [manager GET:path parameters:paramDic success:^(AFHTTPRequestOperation *operation, id responseObject)
         {
             sucess(responseObject);
         }
         failure:^(AFHTTPRequestOperation *operation, NSError *error) {
              NSLog(@"%@",error);
         }];

}
@end
